import segyio
import matplotlib.pyplot as plt
import numpy as np


def load_file(file_name):
    segy_file = None
    try:
        segy_file = segyio.open(file_name, ignore_geometry=True)
    except Exception as e:
        print(e)
        print('Load file %s failed!' % file_name)
        exit(-1)
    else:
        print('Load file %s successful!' % file_name)
        return segy_file
